package com.yunxun.coinmessage.dao;

import com.yunxun.coinmessage.entity.Administrator;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface AdministratorDao {
    @Insert("insert into administrator(aname,apassword) values(#{aname},#{apassword})")
    Integer add(Administrator administrator);
    @Select("select * from administrator where aname=#{aname} and apassword=#{apassword}")
    Administrator queryAdministrator(@Param(value = "aname") String aname, @Param(value = "apassword")String apassword);
}
